/**
 * 新手引导相关逻辑
 * @author kevin 202165023#qq.com
 * @version v1.0 2023-6-16 09:05:26
 */
	let initCount = 0;
	window.onpageshow = () => {
		if (initCount) guide.init();
	};
(function() {
	// alert('当前版本231456');
	let guide = {};
	let mask = $('#modal-guide');
	let pointDirect = $('#guide-point');
	let guideView = $('#modal-guide-view');
	let guideViewTxt = $('#guide-view-text');
	let guideViewBtn = $('#guide-view-btn');
	let guideViewBtnCB = function(){};
	// console.log(guideViewTxt, guideViewBtn);
	let maskModal = null;
	let pointModal = null;
	// 红包弹窗
	let modalWorrget = $('#modal-worrget');
	let worrgetNum = $('#worrgetNum');
	let worrgetText = $('#worrget-text');
	
	let userid;
	let ugid;
	
	
	guide.init = function() {
		userid = getCookie('userid');
		this.getUserGuideIdByCookie();
	}
	// 获取用户引导ID
	guide.getUserGuideIdByCookie = function() {
		ugid = this.getUsersGuideId();
		console.log(ugid);
		if (!ugid) this.getUserGuideIdByHttp();
		else this.showGuide();
	}
	guide.getUserGuideIdByHttp = function() {
		let token = getCookie('token');
		ajax({
			url: DOMAIN + '/home/guide/get_record',
			header: {
				'Authorization': token,
			},
			success: res => {
				let data = res.data;
				if (!data.bu) {
					ugid = 0;
					console.log(ugid);
					guide.setUsersGuideId(ugid);
					location.replace('comic.html');
				}
				else {
					ugid = data.bu;
					console.log(ugid);
					guide.setUsersGuideId(ugid);
					guide.showGuide();
				}
			}
		});
	}
	
	// 显示引导
	guide.showGuide = function() {
		let href = location.href;
		let start = href.indexOf('/page');
		let last = href.lastIndexOf('.html');
		let pagename = href.substring(start+6, last);
		// console.log(pagename);
		switch(ugid) {
			case 0: {
				// location.replace('comic.html');
				guide.showStrategy_1();
				break;
			}
			case 1: {
				// guide.showBuild_1();
				guide.showStrategy_1();
				break;
			}
			case 2: {
				// guide.showBuild_2();
				if (pagename == 'xrgl1') guide.showStrategy_2();
				break;
			}
			case 3: {
				// guide.showBuild_3();
				if (pagename == 'xrgl1') guide.showStrategy_3();
				break;
			}
			case 4: {
				// guide.showBuild_4();
				if (pagename == 'xrgl1') guide.showStrategy_4();
				break;
			}
			case 5: {
				// guide.showExtension_5();
				if (pagename == 'xrgl1') guide.showStrategy_5();
				break;
			}
			case 6: {
				// guide.showExtension_6();
				if (pagename == 'home') guide.showStrategy_6();
				break;
			}
			case 7: {
				// guide.showExtension_6();
				if (pagename == 'energy_Fang') guide.showStrategy_7();
				break;
			}
			case 8: {
				guide.showExtension_8();
				break;
			}
			case 9: {
				guide.showExtension_9();
				break;
			}
			case 10: {
				guide.showExtension_10();
				break;
			}
			case 11: {
				guide.showExtension_11();
				break;
			}
			case 12: {
				guide.showRecruit_12();
				break;
			}
			case 13: {
				guide.showRecruit_12();
				break;
			}
			case 14: {
				guide.showRecruit_12();
				break;
			}
			case 15: {
				guide.showRecruit_12();
				break;
			}
			case 16: {
				guide.showRecruit_16();
				break;
			}
			case 17: {
				guide.showPresent_50();
				break;
			}
			case 50: {
				guide.showPresent_50();
				break;
			}
			case 51: {
				guide.showPresent_51();
				break;
			}
			case 52: {
				guide.showPresent_52();
				break;
			}
			case 53: {
				guide.showRecruit_60();
				break;
			}
			case 60: {
				guide.showRecruit_60();
				break;
			}
			case 61: {
				setTimeout(() => {
					guide.showRecruit_60();
				}, 1000);
				break;
			}
			case 62: {
				guide.showSell_70();
				break;
			}
			case 70: {
				guide.showSell_70();
				break;
			}
			case 71: {
				guide.showSell_70();
				break;
			}
			case 72: {
				guide.showSell_70();
				break;
			}
			case 73: {
				guide.showSell_74();
				break;
			}
			case 74: {
				guide.showSell_74();
				break;
			}
			case 75: {
				guide.showSell_75();
				break;
			}
			case 76: {
				guide.showWithdraw_80();
				break;
			}
			case 77: {
				guide.showWithdraw_80();
				break;
			}
			case 80: {
				guide.showWithdraw_80();
				break;
			}
			case 81: {
				guide.showWithdraw_80();
				break;
			}
			case 82: {
				guide.showWithdraw_80();
				break;
			}
			case 83: {
				guide.showWithdraw_80();
				break;
			}
			case 84: {
				guide.showWithdraw_80();
				break;
			}
			case 85: {
				guide.showWithdraw_80();
				break;
			}
			case 86: {
				guide.showWithdraw_86();
				break;
			}
			case 87: {
				guide.showCheap_100();
				break;
			}
			case 100: {
				if (pagename == 'home') guide.showCheap_100();
				break;
			}
			case 101: {
				if (pagename == 'home') guide.showCheap_100();
				else if (pagename == 'energy_Fang') guide.showCheap_101();
				break;
			}
			case 102: {
				if (pagename == 'home') guide.showCheap_100();
				else if (pagename == 'energy_Fang') guide.showCheap_101();
				else if (pagename == 'each_building') guide.showCheap_102();
				break;
			}
			case 103: {
				if (pagename == 'each_building') guide.showCheap_103();
				break;
			}
			case 104: {
				if (pagename == 'each_building') guide.showCheap_104();
				break;
			}
			case 105: {
				if (pagename == 'low_Ent_ousing_home') guide.showCheap_105();
				break;
			}
			case 106: {
				if (pagename == 'low_Ent_ousing_home') guide.showCheap_106();
				break;
			}
			case 107: {
				if (pagename == 'low_Ent_ousing_home') guide.showCheap_107();
				break;
			}
			case 108: {
				if (pagename == 'low_Ent_ousing_home') guide.showCheap_108();
				break;
			}
			case 109: {
				if (pagename == 'low_Ent_ousing_home') guide.showCheap_109();
				break;
			}
			case 110: {
				if (pagename == 'each_building') guide.showCheap_110();
				break;
			}
			case 111: {
				if (pagename == 'energy_Fang') guide.showCentury_120();
				break;
			}
			case 120: {
				if (pagename == 'energy_Fang') guide.showCentury_120();
				break;
			}
			case 121: {
				if (pagename == 'each_building') guide.showCentury_121();
				break;
			}
			case 122: {
				if (pagename == 'each_building') guide.showCentury_122();
				break;
			}
			case 123: {
				if (pagename == 'each_building') guide.showCentury_122();
				break;
			}
			case 124: {
				if (pagename == 'each_building') guide.showCentury_124();
				break;
			}
			case 125: {
				if (pagename == 'low_Ent_ousing_home') guide.showCentury_125();
				break;
			}
			case 126: {
				if (pagename == 'low_Ent_ousing_home') guide.showCentury_126();
				break;
			}
			case 127: {
				if (pagename == 'renovation') guide.showCentury_127();
				break;
			}
			case 128: {
				if (pagename == 'renovation') guide.showCentury_128();
				break;
			}
			case 129: {
				if (pagename == 'low_Ent_ousing_home') guide.showCentury_129();
				break;
			}
			case 130: {
				if (pagename == 'wealth') guide.showCentury_130();
				break;
			}
			case 131: {
				if (pagename == 'wealth') guide.showCentury_131();
				break;
			}
			case 132: {
				if (pagename == 'low_Ent_ousing_home') guide.showCentury_132();
				break;
			}
			case 133: {
				if (pagename == 'each_building') guide.showCentury_133();
				break;
			}
			case 134: {
				if (pagename == 'energy_Fang') guide.showMine_150();
				break;
			}
			case 150: {
				if (pagename == 'energy_Fang') guide.showMine_150();
				break;
			}
			case 151: {
				if (pagename == 'mine2') guide.showMine_151();
				break;
			}
			case 152: {
				if (pagename == 'mine2') guide.showMine_152();
				break;
			}
			case 153: {
				if (pagename == 'mine2') guide.showMine_153();
				break;
			}
			case 154: {
				if (pagename == 'mine3') guide.showMine_154();
				break;
			}
			case 155: {
				if (pagename == 'mine3') guide.showMine_155();
				break;
			}
			case 156: {
				if (pagename == 'mine3') guide.showMine_156();
				break;
			}
			case 157: {
				if (pagename == 'mine3') guide.showMine_157();
				break;
			}
			case 158: {
				if (pagename == 'mine3') guide.showMine_159();
				break;
			}
			case 159: {
				if (pagename == 'mine3') guide.showMine_160();
				break;
			}
			case 160: {
				if (pagename == 'mine3') guide.showMine_160();
				break;
			}
			case 161: {
				if (pagename == 'mine2') guide.showSearch_181();
				break;
			}
			case 180: {
				if (pagename == 'mine2') guide.showSearch_180();
				break;
			}
			case 181: {
				if (pagename == 'mine2') guide.showSearch_181();
				break;
			}
			case 182: {
				if (pagename == 'search') guide.showSearch_182();
				break;
			}
			case 183: {
				if (pagename == 'search') guide.showSearch_184();
				break;
			}
			case 184: {
				if (pagename == 'search') guide.showSearch_184();
				break;
			}
			case 185: {
				if (pagename == 'mine2') guide.showSearch_185();
				break;
			}
			case 186: {
				if (pagename == 'energy_Fang') guide.showSearch_186();
				break;
			}
			case 187: {
				if (pagename == 'home') guide.showReach_190();
				break;
			}
			case 190: {
				if (pagename == 'home') guide.showReach_190();
				break;
			}
			case 191: {
				if (pagename == 'home') guide.showReach_190();
				break;
			}
			case 192: {
				if (pagename == 'home') guide.showComplete_200();
				break;
			}
			case 193: {
				if (pagename == 'home') guide.showComplete_200();
				break;
			}
			case 200: {
				if (pagename == 'home') guide.showComplete_200();
				break;
			}
			default: {
				// openTips('已完成所有预设引导');
			}
		}
	}
	
	// 引导点击 新人攻略 2023-7-18 =======
	// 点击新人攻略
	guide.showStrategy_1 = function() {
		// window.scrollTo(0, 200);
		let body = $('#guide-option1');
		let node = $('#guide-xrgl');
		console.dir(node);
		this.showDirectMask();
		body.style.zIndex = 999;
		node.style.zIndex = 99;
		this.maskModal = this.createModalMask(body);
		this.maskModal.style.position = 'absolute';
		this.maskModal.style.width = '100%';
		this.maskModal.style.height = '100%';
		this.maskModal.style.background = 'rgba(0, 0, 0, 0.6)';
		this.pointModal = this.createModalPoint(body);
		this.pointModal.style.position = 'absolute';
		this.moveModalPoint(this.pointModal, 0, '64%', 0, '-16px');
		node.onclick = () => {
			this.hideStrategy_1();
		}
	}
	guide.hideStrategy_1 = function() {
		this.updateGuideId(2);
		let body = $('#guide-option1');
		let node = $('#guide-xrgl');
		this.hideDirectMask();
		body.style.zIndex = '';
		node.style.zIndex = '';
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
	}
	// 一键加群
	guide.showStrategy_2 = function() {
		let node = $('#yijianqqqun');
		// console.dir(node);
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node, 'absolute');
		node.onclick = () => {
			this.hideStrategy_2();
			this.showStrategy_3();
		}
	}
	guide.hideStrategy_2 = function() {
		this.updateGuideId(3);
		let node = $('#yijianqqqun');
		this.hideDirectMask();
		this.directNodeRecover(node, 'flex');
		this.hideDirectPoint();
	}
	// 立即兑换
	guide.showStrategy_3 = function() {
		let node = $('#lingqu2');
		// console.dir(node);
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node, 'absolute');
	}
	guide.hideStrategy_3 = function() {
		this.updateGuideId(4);
		let node = $('#lingqu2');
		this.hideDirectMask();
		this.directNodeRecover(node, 'flex');
		this.hideDirectPoint();
	}
	// 立即兑换
	guide.showStrategy_4 = function() {
		let recruit = $("#modal-code");
		if (recruit.style.display !== 'block') recruit.style.display = 'block';
		let node1 = $('#inp');
		let node2 = $('#quren_btn');
		let cha2 = $('#cha2');
		let body = document.querySelector('.modal-code .modal-body');
		this.modalNodeHighlight(node1);
		this.modalNodeHighlight(node2);
		this.modalNodeHighlight(cha2, 'absolute');
		this.showModalPoint(node1, body);
		node1.placeholder = '请输入激活码';
		this.moveModalPoint(this.pointModal, '85%', '50%')
		this.maskModal.style.height = '120%';
		this.maskModal.style.top = '-10%';
	}
	guide.hideStrategy_4 = function() {
		this.updateGuideId(5);
		let modal = $("#modal-code");
		modal && (modal.style.display = 'none');
		let node1 = $('#inp');
		let node2 = $('#quren_btn');
		let cha2 = $('#cha2');
		let body = document.querySelector('.modal-code .modal-body');
		this.modalNodeRecover(node1);
		this.modalNodeRecover(node2);
		this.modalNodeRecover(cha2);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		guide.showStrategy_5();
	}
	
	// 引导返回
	guide.showStrategy_5 = function() {
		$('#top_nav').style.zIndex = '100';
		let node = $('#top_img');
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node, 'relative');
	}
	guide.hideStrategy_5 = function() {
		this.updateGuideId(6);
		let node = $('#top_img');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	
	// 能量房产
	guide.showStrategy_6 = function() {
		let node = $('#energy');
		this.showDirectMask();
		this.directNodeHighlight(node, 'absulute');
		this.showDirectPoint(node);
		// 滚动到底部防止小屏不能显示转赠按钮
		setTimeout(() => {
			let st = 0;
			let siv = setInterval(() => {
				st += 5;
				window.scrollTo(0, st);
				if (st >= 50) clearInterval(siv);
			}, 16.66);
		}, 500);
	}
	guide.hideStrategy_6 = function() {
		this.updateGuideId(7);
		let node = $('#energy');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	
	// 银币攻略
	guide.showStrategy_7 = function() {
		let body = $('#guide-top_tit');
		let node = $('#guide-xrgl');
		// console.dir(node);
		this.showDirectMask();
		body.style.zIndex = 999;
		node.style.zIndex = 99;
		node.style.position = 'relative';
		this.maskModal = this.createModalMask(body);
		this.maskModal.style.position = 'absolute';
		this.maskModal.style.width = '100%';
		this.maskModal.style.height = '100%';
		this.maskModal.style.background = 'rgba(0, 0, 0, 0.6)';
		this.pointModal = this.createModalPoint(body);
		this.pointModal.style.position = 'absolute';
		this.moveModalPoint(this.pointModal, 0, '64%', 0, '-16px');
		node.onclick = () => {
			this.hideStrategy_7();
			node.href = 'xrgl2.html';
		}
	}
	guide.hideStrategy_7 = function() {
		this.updateGuideId(210);
		let body = $('#guide-top_tit');
		let node = $('#guide-xrgl');
		this.hideDirectMask();
		body.style.zIndex = '';
		node.style.zIndex = '';
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
	}
	
	// ====== 2023-7-18 14:58:15 ↑↑↑↑↑↑↑
	
	
	// 建造引导 地皮
	guide.showBuild_1 = function() {
		let node = $('#guide-apartment_1');
		// console.dir(node);
		this.showDirectMask();
		this.directNodeHighlight(node, 'absulute');
		this.showDirectPoint(node);
	}
	guide.hideBuild_1 = function() {
		let node = $('#guide-apartment_1');
		this.hideDirectMask();
		this.directNodeRecover(node, 'flex');
		this.hideDirectPoint();
	}
	// 建造
	guide.showBuild_2 = function() {
		this.hideBuild_1();
		this.updateGuideId(2);
		let recruit = document.getElementById("modal-build");
		if (recruit.style.display == 'block') return;
		recruit.style.display = 'block';
		let node = document.getElementById('jianzao');
		let body = document.querySelector('.modal-build .modal-body');
		this.modalNodeHighlight(node);
		this.showModalPoint(node, body);
	}
	guide.hideBuild_2 = function() {
		let recruit = document.getElementById("modal-build");
		recruit.style.display = '';
		let node = document.getElementById('jianzao');
		let body = document.querySelector('.modal-build .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
	}
	// 红包
	guide.showBuild_3 = function() {
		this.hideBuild_2();
		this.updateGuideId(3);
		setTimeout(() => {
			let txt = '恭喜完成建造任务，1.0元现金奖励已进入钱包了哦';
			this.showRedPacket(1.0, txt);
			this.updateGuideId(4);
		}, 1000);
	}
	// 查看产速
	guide.showBuild_4 = function() {
		// this.hideBuild_1();
		// this.updateGuideId(2);
		let txt = '建造房产成功，房产开始产出银币，扩建可以加速产生银币，去扩建给银币加速吧';
		this.showGuideView(txt, '确定');
		let node = $('#guide-top6');
		this.directNodeHighlight(node);
		node.style.border = '1px solid white';
		node.classList.add('flicker');
		this.guideViewBtnCB = () => {
			console.log('guideViewBtnCB');
			this.hideBuild_4();
			this.showExtension_5()
		}
		return ;
	}
	guide.hideBuild_4 = function() {
		this.updateGuideId(5);
		let node = $('#guide-top6');
		this.directNodeRecover(node, 'initial');
		node.style.border = '';
		node.classList.remove('flicker');
	}
	
	// 扩建引导 房产
	guide.showExtension_5 = function() {
		let node = $('#guide-jianzhu_1');
		this.showDirectMask();
		this.directNodeHighlight(node, 'absulute');
		this.showDirectPoint(node, 'absolute');
	}
	guide.hideExtension_5 = function() {
		this.updateGuideId(6);
		let node = $('#guide-jianzhu_1');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		this.showExtension_6();
	}
	// 扩建引导 扩建
	guide.showExtension_6 = function() {
		$('#guide-jianzhu_1').click();
		// let recruit = $("#modal-recruit");
		// if (recruit.style.display == 'block') return;
		// recruit.style.display = 'block';
		setTimeout(() => {
			let node = $('#guide-kuojian');
			// 复制一个扩建按钮
			let nodeClone = cloneElement(node);
			// console.log(node, nodeClone);
			nodeClone.id = 'guide-kuojian-clone';
			nodeClone.style.right = '24px';
			nodeClone.style.top = '326px';
			nodeClone.style.width = '59px';
			nodeClone.onclick = () => {
				// node.click();
				this.updateGuideId(7, false);
				this.hideExtension_6();
				this.showExtension_7();
			};
			let body = document.querySelector('.modal-recruit .modal-body');
			body.appendChild(nodeClone);
			// 隐藏原有按钮
			hideElement(node);
			// 移动手势位置
			let point = this.showModalPoint(node, body);
			// console.log(point);
			this.moveModalPoint(point, '376px', 0, '12px');
		}, 500);
	}
	guide.hideExtension_6 = function() {
		let recruit = $("#modal-recruit");
		recruit.style.display = '';
		let node = $('#guide-kuojian');
		let body = document.querySelector('.modal-recruit .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		// 删除复制的按钮
		let clone = $('#guide-kuojian-clone');
		this.removeModalPoint(clone);
	}
	// 扩建引导 扩大规模
	guide.showExtension_7 = function() {
		let recruit = $("#modal-expand");
		if (recruit.style.display == 'block') return;
		recruit.style.display = 'block';
		let node = $('#expandConfirm');
		let body = document.querySelector('.modal-expand .modal-body');
		this.modalNodeHighlight(node);
		this.showModalPoint(node, body);
		// 绑定按钮事件
		node.onclick = () => {
			indexUpHouse(3);
			this.hideExtension_7();
		}
	}
	guide.hideExtension_7 = function() {
		this.updateGuideId(8);
		let modal = $("#modal-expand");
		modal.style.display = '';
		let node = $('#expandConfirm');
		node.onclick = null;
		let body = document.querySelector('.modal-expand .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		this.showExtension_8();
	}
	// 红包
	guide.showExtension_8 = function() {
		// this.hideExtension_7();
		setTimeout(() => {
			let txt = '恭喜完成扩建任务，0.8元现金奖励已进入钱包了哦';
			this.showRedPacket(0.8, txt);
			this.updateGuideId(9);
			$('#modal-extend').style.display = 'none';
		}, 1000);
	}
	// 查看产速
	guide.showExtension_9 = function() {
		// this.hideBuild_8();
		// this.updateGuideId(2);
		let txt = '恭喜扩建完成，加速了银币产出，快去收取房产的银币吧';
		this.showGuideView(txt, '前往收取');
		let node = $('#guide-top6');
		this.directNodeHighlight(node);
		node.style.border = '1px solid white';
		node.classList.add('flicker');
		this.guideViewBtnCB = () => {
			console.log('guideViewBtnCB');
			this.modalNodeRecover(node);
			this.hideExtension_9();
			this.showExtension_10();
		}
		return ;
	}
	guide.hideExtension_9 = function() {
		this.updateGuideId(10);
		let modal = $('#modal-recruit');
		modal && (modal.style.display = 'none');
		let node = $('#guide-top6');
		this.directNodeRecover(node, 'initial');
		node.style.border = '';
		node.classList.remove('flicker');
		this.showExtension_10();
	}
	// 收集银币
	guide.showExtension_10 = function() {
		let node = $('#guide-cuizi_1');
		this.showDirectMask();
		this.directNodeHighlight(node, 'absulute');
		this.showDirectPoint(node, 'absolute');
	}
	guide.hideExtension_10 = function() {
		this.updateGuideId(11);
		let node = $('#guide-cuizi_1');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		setTimeout(() => {
			guide.showExtension_11();
		}, 2000);
	}
	// 查看银币（前往招募）
	guide.showExtension_11 = function() {
		// this.hideBuild_8();
		// this.updateGuideId(2);
		let txt = '恭喜您获得了第一笔银币，可以去招募租户了，银币需要收取，记得点击收取哦';
		this.showGuideView(txt, '前往招募');
		let node = $('#yinbi');
		this.directNodeHighlight(node);
		node.style.border = '1px solid white';
		node.classList.add('flicker');
		this.guideViewBtnCB = () => {
			console.log('guideViewBtnCB');
			this.modalNodeRecover(node);
			this.hideExtension_11();
			this.showRecruit_12();
		}
		return ;
	}
	guide.hideExtension_11 = function() {
		this.updateGuideId(12);
		let node = $('#yinbi');
		this.directNodeRecover(node, 'initial');
		node.style.border = '';
		node.classList.remove('flicker');
	}
	
	// 招募引导 地皮
	guide.showRecruit_12 = function() {
		let node = $('#guide-jianzhu_1');
		this.showDirectMask();
		this.directNodeHighlight(node, 'absulute');
		this.showDirectPoint(node, 'absolute');
	}
	guide.hideRecruit_12 = function() {
		this.updateGuideId(13);
		let node = $('#guide-jianzhu_1');
		this.hideDirectMask();
		this.directNodeRecover(node, 'flex');
		this.hideDirectPoint();
		this.showRecruit_13();
	}
	// 查看 出售提示
	guide.showRecruit_13 = function() {
		// this.updateGuideId(13);
		let txt = '招募租户也会增加银币产出，租户越多产出银币就越多，达到目标人数可以出售房产获得金币去招募租户到目标人数吧';
		this.showGuideView(txt, '确定');
		this.guideViewBtnCB = () => {
			console.log('guideViewBtnCB');
			// this.modalNodeRecover(node);
			// this.hideExtension_12();
			this.updateGuideId(14);
			this.showRecruit_14();
		}
	}
	guide.hideRecruit_13 = function() {
		this.updateGuideId(14);
	}
	// 出售提示
	guide.showRecruit_14 = function() {
		let txt = '<div>'
			+'<p style="text-align: left">招募租户也会增加银币，租户越多产出银币就越多</p>'
			+'<p style="text-align: left">招募分为</p>'
			+'<p style="color: #d16204; text-align: left">单次招募：招募1位租户</p>'
			+'<p style="color: #d16204; text-align: left">十连招募：一次招募10位租户</p>'
			+'<p style="color: #d16204; text-align: left">目标招募：消耗所有银币，招募对应数量的租户</p>'
		+'</div>';
		this.showGuideView(txt, '我知道了');
		this.guideViewBtnCB = () => {
			// console.log('guideViewBtnCB');
			// this.modalNodeRecover(node);
			this.hideRecruit_14();
			// this.updateGuideId(15);
		}
	}
	guide.hideRecruit_14 = function() {
		this.updateGuideId(15);
		this.showRecruit_15();
	}
	// 十连招
	guide.showRecruit_15 = function() {
		let recruit = $("#modal-recruit");
		if (recruit.style.display !== 'block') recruit.style.display = 'block';
		let node = $('#guide-zmbtn');
		let body = document.querySelector('.modal-recruit .modal-body');
		this.modalNodeHighlight(node);
		this.showModalPoint(node, body);
	}
	guide.hideRecruit_15 = function() {
		// this.hideBuild_1();
		this.updateGuideId(16);
		let recruit = $("#modal-recruit");
		recruit && (recruit.style.display = 'none');
		let node = $('#guide-zmbtn');
		let body = document.querySelector('.modal-recruit .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		setTimeout(() => {
			guide.showRecruit_16();
		}, 500);
	}
	// 红包
	guide.showRecruit_16 = function() {
		// this.hideExtension_7();
		setTimeout(() => {
			let txt = '恭喜完成招募任务，0.8元现金奖励已进入钱包了哦';
			this.showRedPacket(0.8, txt);
			this.updateGuideId(17);
		}, 1000);
	}
	
	// 爷爷的馈赠 按钮
	guide.showPresent_50 = function() {
		let node = $('#present');
		let nodeClone = cloneElement(node);
		nodeClone.id = 'guide-present-clone';
		nodeClone.style.right = '3px';
		nodeClone.style.top = '35%';
		nodeClone.style.width = '15%';
		nodeClone.onclick = () => {
			// node.click();
			// this.updateGuideId(51);
			this.hidePresent_50();
			this.showPresent_51();
		};
		$('#zone').appendChild(nodeClone);
		// 隐藏原有按钮
		node.style.visibility = 'hidden';
		this.showDirectMask();
		// this.directNodeHighlight(node, 'absulute');
		this.showDirectPoint(node, 'absolute');
	}
	guide.hidePresent_50 = function() {
		this.updateGuideId(51);
		// 删除复制元素
		let node = $('#guide-present-clone');
		let res = this.removeModalPoint(node);
		// 复原原有元素
		$('#present').style.visibility = '';
		this.hideDirectMask();
		this.directNodeRecover(node, 'flex');
		this.hideDirectPoint();
	}
	// 观看广告
	guide.showPresent_51 = function() {
		let modal = $("#modal-present");
		if (modal.style.display !== 'block') modal.style.display = 'block';
		let yeye1 = $('#yeye1');
		yeye1.innerText = '银币+10k';
		let node = $('#ad_action');
		let body = document.querySelector('.modal-present .modal-body');
		this.modalNodeHighlight(node);
		this.showModalPoint(node, body);
		this.maskModal.style.height = '68vh';
		this.moveModalPoint(this.pointModal, '110%', '36%');
	}
	guide.hidePresent_51 = function() {
		// 删除复制元素
		let node = $('#guide-present-clone');
		let res = this.removeModalPoint(node);
		// 复原原有元素
		$('#present').style.visibility = '';
		this.hideDirectMask();
		this.directNodeRecover(node, 'flex');
		this.hideDirectPoint();
	}
	// 奖励银币
	guide.showPresent_52 = function() {
		this.updateGuideId(52);
		// this.hideExtension_7();
		setTimeout(() => {
			this.showCoinReward('silver', '1M');
			this.updateGuideId(53);
		}, 1000);
	}
	
	// 招募引导2
	guide.showRecruit_60 = function() {
		setTimeout(()=> {
			let node = $('#guide-jianzhu_1');
			this.showDirectMask();
			this.directNodeHighlight(node, 'absulute');
			this.showDirectPoint(node, 'absolute');
		},1000)
	}
	guide.hideRecruit_60 = function() {
		this.updateGuideId(61);
		let node = $('#guide-jianzhu_1');
		this.hideDirectMask();
		this.directNodeRecover(node, 'flex');
		this.hideDirectPoint();
		setTimeout(() => {
			guide.showRecruit_61();
		}, 1000);
	}
	// 二次招募 目标招募 30人
	guide.showRecruit_61 = function() {
		let recruit = $("#modal-recruit");
		if (recruit.style.display !== 'block') recruit.style.display = 'block';
		let node = $('#guide-zmbtn3');
		// console.log(node);
		let body = document.querySelector('.modal-recruit .modal-body');
		this.modalNodeHighlight(node);
		this.showModalPoint(node, body);
	}
	guide.hideRecruit_61 = function() {
		// this.hideBuild_1();
		this.updateGuideId(62);
		let recruit = $("#modal-recruit");
		console.log(recruit.style.display);
		recruit && (recruit.style.display = 'none');
		console.log(recruit.style.display);
		let node = $('#guide-zmbtn3');
		let body = document.querySelector('.modal-recruit .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		setTimeout(() => {
			guide.showSell_70();
		}, 1000);
	}
	
	// 出售引导
	guide.showSell_70 = function() {
		$("#modal-recruit").style.display = 'none';
		let node = $('#guide-jianzhu_1');
		this.showDirectMask();
		this.directNodeHighlight(node, 'absulute');
		this.showDirectPoint(node, 'absolute');
	}
	guide.hideSell_70 = function() {
		this.updateGuideId(71);
		let node = $('#guide-jianzhu_1');
		this.hideDirectMask();
		this.directNodeRecover(node, 'flex');
		this.hideDirectPoint();
	}
	// 出售
	guide.showSell_71 = function() {
		let modal = $("#modal-recruit");
		if (modal.style.display !== 'block') modal.style.display = 'block';
		let node = $('#sellimg');
		// console.log(node);
		let body = document.querySelector('.modal-recruit .modal-body');
		this.modalNodeHighlight(node);
		this.showModalPoint(node, body);
	}
	guide.hideSell_71 = function() {
		// this.hideBuild_1();
		this.updateGuideId(72);
		let modal = $("#modal-recruit");
		modal && (modal.style.display = 'none');
		let node = $('#sellimg');
		let body = document.querySelector('.modal-recruit .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
	}
	// 立即出售
	guide.showSell_72 = function() {
		this.hideSell_71();
		let modal = $("#modal-sale");
		if (modal.style.display !== 'block') modal.style.display = 'block';
		let node = $('#cs_confirm');
		// console.log(node);
		let body = document.querySelector('.modal-sale .modal-body');
		this.modalNodeHighlight(node);
		this.showModalPoint(node, body);
	}
	guide.hideSell_72 = function() {
		// this.hideBuild_1();
		this.updateGuideId(72);
		let modal = $("#modal-sale");
		modal && (modal.style.display = 'none');
		let node = $('#cs_confirm');
		let body = document.querySelector('.modal-sale .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
	}
	// 出售房产成功 自动弹出恭喜获得金币的弹窗，记作73
	// 出售红包
	guide.showSell_74 = function() {
		// this.hideExtension_7();
		this.updateGuideId(74);
		setTimeout(() => {
			let txt = '恭喜完成招募任务，1.0元现金奖励已进入钱包了哦';
			this.showRedPacket(1.0, txt);
			this.updateGuideId(75);
		}, 1000);
	}
	// 查看金币
	guide.showSell_75 = function() {
		// this.hideBuild_8();
		// this.updateGuideId(2);
		let txt = '获得4金币奖励，达到招募人数就可以出售获得金币，金币可以兑换零钱，还可以去市场购买材料';
		this.showGuideView(txt, '确认');
		let node = $('#jinbi');
		this.directNodeHighlight(node);
		node.style.border = '1px solid white';
		node.classList.add('flicker');
		this.guideViewBtnCB = () => {
			this.modalNodeRecover(node);
			this.hideSell_75();
			setTimeout(() => {
				guide.showWithdraw_80();
			}, 1000);
		}
	}
	guide.hideSell_75 = function() {
		this.updateGuideId(76);
		let node = $('#jinbi');
		this.directNodeRecover(node, 'initial');
		node.style.border = '';
		node.classList.remove('flicker');
	}
	// 引导关闭
	guide.showSell_76 = function() {
		console.log(76);
		let jianzhu = $('#guide-jianzhu_1');
		jianzhu && jianzhu.click();
		let modal = $("#modal-recruit");
		let node = $('#close-recruit');
		let body = document.querySelector('.modal-recruit .modal-body');
		this.modalNodeHighlight(node, 'absolute');
		this.showModalPoint(node, body);
		this.moveModalPoint(this.pointModal, '5%', 0, '-1%');
	}
	guide.hideSell_76 = function() {
		this.updateGuideId(77);
		let node = $('#close-recruit');
		this.modalNodeRecover(node, '');
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		this.showWithdraw_80();
	}
	
	// 引导 金币兑换
	guide.showWithdraw_80 = function() {
		let node = $('#duihuan');
		this.showDirectMask();
		this.directNodeHighlight(node, 'absulute');
		this.showDirectPoint(node);
		this.moveModalPoint(pointDirect, '4%', 0, '-16px');
	}
	guide.hideWithdraw_80 = function(n84=true) {
		n84 && this.updateGuideId(81);
		let node = $('#duihuan');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		n84 && guide.showWithdraw_81();
	}
	// 兑换弹窗 转赠金币
	guide.showWithdraw_81 = function() {
		// $('#duihuan').click();
		// 滚动到底部防止小屏不能显示转赠按钮
		setTimeout(() => {
			let st = 0;
			let cont = $('#guide-modal-exchange-content');
			let siv = setInterval(() => {
				st += 5;
				cont.scrollTop = st;
				if (st >= 1000) clearInterval(siv);
			}, 16.66);
		}, 500);
		let node = $('#transfer');
		let body = document.querySelector('.modal-exchange .modal-body');
		this.modalNodeHighlight(node);
		this.showModalPoint(node, body);
		this.moveModalPoint(this.pointModal, '92%', '50%');
	}
	guide.hideWithdraw_81 = function() {
		this.updateGuideId(82);
		// this.hideBuild_1();
		// this.updateGuideId(72);
		// let modal = $("#modal-exchange");
		// modal && (modal.style.display = 'none');
		let node = $('#transfer');
		let body = document.querySelector('.modal-exchange .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		this.showWithdraw_82();
	}
	// 查看 转赠提示
	guide.showWithdraw_82 = function() {
		let txt = '拥有金币可以转赠，输入好友ID之后将金币转赠给好友';
		this.showGuideView(txt, '确认');
		this.guideViewBtnCB = () => {
			this.hideWithdraw_82();
			this.showWithdraw_83();
		}
		// 删除 转赠提示
		let node = $('#transfer');
		let body = document.querySelector('.modal-exchange .modal-body');
		this.modalNodeRecover(node, '');
		let point = $('#guide-modal-point');
		this.removeModalPoint(point);
		// 弹窗滚动到顶部
		let st = 1000;
		let cont = $('#guide-modal-exchange-content');
		let siv = setInterval(() => {
			st -= 5;
			cont.scrollTop = st;
			if (st <= 0) clearInterval(siv);
		}, 16.66);
	}
	guide.hideWithdraw_82 = function() {
		this.updateGuideId(83);
	}
	// 引导 关闭转赠
	guide.showWithdraw_83 = function() {
		let modal = $("#modal-give");
		if (modal.style.display !== 'block') modal.style.display = 'block';
		let node = $('#close-give');
		let body = document.querySelector('.modal-give .modal-body');
		this.modalNodeHighlight(node, 'absolute');
		this.showModalPoint(node, body);
		this.moveModalPoint(this.pointModal, '8%', 0, '-12px');
	}
	guide.hideWithdraw_83 = function() {
		this.updateGuideId(84);
		this.showWithdraw_84();
		let modal = $("#modal-give");
		modal && (modal.style.display = 'none');
		let node = $('#close-give');
		let body = document.querySelector('.modal-give .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
	}
	// 兑换金币
	guide.showWithdraw_84 = function() {
		this.hideWithdraw_80(false);
		let modal = $("#modal-exchange");
		if (modal.style.display !== 'block') $('#duihuan').click();
		let body = document.querySelector('.modal-exchange .modal-body');
		// 预留时间加载数据
		setTimeout(() => {
			let node = $('#guide-ex_btn_0');
			this.modalNodeHighlight(node);
			this.showModalPoint(node, body);
		}, 1000);
	}
	guide.hideWithdraw_84 = function() {
		// this.updateGuideId(86);
		let modal = $("#modal-exchange");
		modal && (modal.style.display = 'none');
		let node = $('#exchange-confirm');
		let body = document.querySelector('.modal-exchange .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
	}
	// 确认兑换
	guide.showWithdraw_85 = function() {
		this.updateGuideId(85);
		let modal = $("#modal-transfer2");
		if (modal.style.display !== 'block') $('#guide-ex_btn_0').click();
		let body = document.querySelector('.modal-transfer2 .modal-body');
		// 预留时间加载数据
		setTimeout(() => {
			let node = $('#exchange-confirm');
			this.modalNodeHighlight(node);
			this.showModalPoint(node, body);
		}, 200);
	}
	guide.hideWithdraw_85 = function() {
		this.hideWithdraw_84();
		this.updateGuideId(86);
		let modal = $("#modal-transfer2");
		modal && (modal.style.display = 'none');
		let node = $('#exchange-confirm');
		let body = document.querySelector('.modal-transfer2 .modal-body');
		this.modalNodeRecover(node);
		// 删除所有弹窗引导
		let masks = $('.modal-body-mask');
		let points = $('.modal-point');
		for (let mask of masks) {
			console.log(mask);
			this.removeModalPoint(mask);
		}
		for (let point of points) {
			console.log(point);
			this.removeModalPoint(point);
		}
		this.showWithdraw_86();
	}
	// 查看 兑换结果
	guide.showWithdraw_86 = function() {
		// this.hideBuild_8();
		// this.updateGuideId(2);
		let txt = '获得0.1元，快去钱包提现吧';
		this.showGuideView(txt, '确认');
		this.guideViewBtnCB = () => {
			console.log('guideViewBtnCB');
			this.updateGuideId(87);
			this.showCheap_100();
		}
		return ;
	}
	guide.hideWithdraw_86 = function() {
		this.updateGuideId(87);
		let node = $('#jinbi');
		this.directNodeRecover(node, 'initial');
		node.style.border = '';
		node.classList.remove('flicker');
	}
	
	// 引导 提现 （不做）
	guide.showWithdraw_90 = function() {
		let node = $('#duihuan');
		this.showDirectMask();
		this.directNodeHighlight(node, 'absulute');
		this.showDirectPoint(node);
	}
	guide.hideWithdraw_90 = function() {
		this.updateGuideId(81);
		let node = $('#duihuan');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	
	// 引导 能量房产 廉租房
	guide.showCheap_100 = function() {
		let node = $('#energy');
		this.showDirectMask();
		this.directNodeHighlight(node, 'absulute');
		this.showDirectPoint(node);
		// 滚动到底部防止小屏不能显示转赠按钮
		setTimeout(() => {
			let st = 0;
			let siv = setInterval(() => {
				st += 5;
				window.scrollTo(0, st);
				if (st >= 50) clearInterval(siv);
			}, 16.66);
		}, 500);
	}
	guide.hideCheap_100 = function() {
		// this.updateGuideId(101);
		let node = $('#energy');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 廉租房
	guide.showCheap_101 = function() {
		let node = $('.top_t11')[0];
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node, 'relative');
	}
	guide.hideCheap_101 = function() {
		this.updateGuideId(102);
		let node = $('.top_t11')[0];
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 租住
	guide.showCheap_102 = function() {
		this.showDirectMask();
		setTimeout(()=> {
			let node = $('#monery_btn');
			this.directNodeHighlight(node, 'absolute');
			this.showDirectPoint(node, 'absolute');
		},500)
	}
	guide.hideCheap_102 = function() {
		// this.updateGuideId(101);
		let node = $('#monery_btn');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		this.showCheap_103();
	}
	// 入住红包
	guide.showCheap_103 = function() {
		// this.hideExtension_7();
		this.updateGuideId(103);
		setTimeout(() => {
			let txt = '恭喜完成租住任务，0.8元现金奖励已进入钱包了哦';
			this.showRedPacket(0.8, txt);
			this.updateGuideId(104);
		}, 1000);
		$('#modal-worrget-close').onclick = () => {
			modalWorrget.style.display = 'none';
			this.showCheap_104();
		}
	}
	// 进入廉租房
	guide.showCheap_104 = function() {
		$('#switch').click();
		setTimeout(() => {
			let node = $('#monery_btn');
			this.showDirectMask();
			this.directNodeHighlight(node, 'absolute');
			this.showDirectPoint(node, 'absolute');
		}, 1000);
	}
	guide.hideCheap_104 = function() {
		this.updateGuideId(105);
		let node = $('#monery_btn');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 一键加群
	guide.showCheap_105 = function() {
		$('#zone_body').scrollTop = 0;
		let node = $('#yijianqqqun');
		this.showDirectMask();
		this.directNodeHighlight(node, 'absolute');
		this.showDirectPoint(node, 'absolute');
		node.onclick = () => {
			this.hideCheap_105()
		}
	}
	guide.hideCheap_105 = function() {
		this.updateGuideId(106);
		let node = $('#yijianqqqun');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		this.showCheap_106();
	}
	// 立即兑换
	guide.showCheap_106 = function() {
		$('#zone_body').scrollTop = 0;
		let node = $('#lingqu2');
		this.showDirectMask();
		this.directNodeHighlight(node, 'absolute');
		this.showDirectPoint(node, 'absolute');
		// node.onclick = () => {
		// 	this.hideCheap_105()
		// }
	}
	guide.hideCheap_106 = function() {
		this.updateGuideId(107);
		let node = $('#lingqu2');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 输入激活码 确认激活码
	guide.showCheap_107 = function() {
		let recruit = $("#modal-code");
		if (recruit.style.display !== 'block') recruit.style.display = 'block';
		let node1 = $('#inp');
		let node2 = $('#quren_btn');
		let cha2 = $('#cha2');
		let body = document.querySelector('.modal-code .modal-body');
		this.modalNodeHighlight(node1);
		this.modalNodeHighlight(node2);
		this.modalNodeHighlight(cha2, 'absolute');
		this.showModalPoint(node1, body);
		node1.placeholder = '请输入激活码';
		this.moveModalPoint(this.pointModal, '85%', '50%')
		this.maskModal.style.height = '120%';
		this.maskModal.style.top = '-10%';
	}
	guide.hideCheap_107 = function() {
		// this.hideBuild_1();
		this.updateGuideId(108);
		let modal = $("#modal-code");
		modal && (modal.style.display = 'none');
		let node1 = $('#inp');
		let node2 = $('#quren_btn');
		let cha2 = $('#cha2');
		let body = document.querySelector('.modal-code .modal-body');
		this.modalNodeRecover(node1);
		this.modalNodeRecover(node2);
		this.modalNodeRecover(cha2);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		setTimeout(() => {
			guide.showCheap_108();
		}, 1000);
	}
	// 点击退租
	guide.showCheap_108 = function() {
		$('#zone_body').scrollTop = 0;
		let nodes = document.querySelectorAll('#tuichu');
		let node = '';
		for (var i = 0; i < nodes.length; i++) {
			console.log(nodes[i].getAttribute('guide-id'));
			if (nodes[i].getAttribute('guide-id') == 1) {
				node = nodes[i];
				break;
			}
		}
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node);
		this.moveModalPoint(pointDirect, '45%', '12%');
	}
	guide.hideCheap_108 = function() {
		this.updateGuideId(109);
		let nodes = document.querySelectorAll('#tuichu');
		let node = '';
		for (var i = 0; i < nodes.length; i++) {
			if (nodes[i].getAttribute('guide-id') == 1) {
				node = nodes[i];
				break;
			}
		}
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		this.showCheap_109();
	}
	// 退租确认弹窗
	guide.showCheap_109 = function() {
		$('#zone_body').scrollTop = 0;
		let modal = $("#modal-tuizu");
		if (modal.style.display !== 'block') modal.style.display = 'block';
		let node = $('#qunren2');
		let body = document.querySelector('.modal-tuizu .modal-body');
		this.modalNodeHighlight(node);
		this.showModalPoint(node, body);
		this.moveModalPoint(this.pointModal, '70%', '75%');
	}
	guide.hideCheap_109 = function() {
		this.updateGuideId(110);
		let modal = $("#modal-tuizu");
		modal && (modal.style.display = 'none');
		let node = $('#qunren2');
		let body = document.querySelector('.modal-tuizu .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		this.showCheap_110();
	}
	// 返回 到能量房产
	guide.showCheap_110 = function() {
		let node = $('#top_img');
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node, 'relative');
	}
	guide.hideCheap_110 = function() {
		this.updateGuideId(111);
		let node = $('#top_img');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	
	// 引导 世纪城
	guide.showCentury_120 = function() {
		let node = $('.top_t22')[0];
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node, 'relative');
	}
	guide.hideCentury_120 = function() {
		this.updateGuideId(121);
		let node = $('.top_t22')[0];
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 查看 租住提示
	guide.showCentury_121 = function() {
		// this.hideBuild_8();
		// this.updateGuideId(2);
		let txt = '<p style="text-align: left">未住满的房间都可以消耗金币进行租住<p>'
			+'<p style="text-align: left; margin-top: 8px;">租住房间可以获得能量产出加速，完成房间任务获得祈福签，还会获得金币奖励</p>';
		this.showGuideView(txt, '确认');
		this.guideViewBtnCB = () => {
			console.log('guideViewBtnCB');
			// return 
			this.hideCentury_121();
			// this.showCentury_122();
		}
	}
	guide.hideCentury_121 = function() {
		// this.updateGuideId(122);
		this.updateGuideId(123);
	}
	// 租住 非强制引导
	guide.showCentury_122 = function() {
		return false; 
		let node = $('#monery_btn');
		this.showDirectMask();
		this.directNodeHighlight(node, 'relative');
		this.showDirectPoint(node, 'absolute');
		// 世纪城租住取消强制引导 2023-6-24 15:17:18
		let txt = '<p style="text-align: left">未住满的房间都可以消耗金币进行租住<p>'
			+'<p style="text-align: left; margin-top: 8px;">租住房间可以获得能量产出加速，完成房间任务获得祈福签，还会获得金币奖励</p>';
		this.showGuideView(txt, '确认');
		this.guideViewBtnCB = () => {
			console.log('guideViewBtnCB');
			// return 
			this.hideCentury_122();
			this.showCentury_123();
		}
	}
	guide.hideCentury_122 = function() {
		// this.updateGuideId(123);
		let node = $('#monery_btn');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		this.showCentury_123();
	}
	// 确认租住
	guide.showCentury_123 = function() {
		let recruit = $("#modal-prompt");
		if (recruit.style.display !== 'block') recruit.style.display = 'block';
		let node = $('#btn_que3');
		let body = document.querySelector('.modal-prompt .modal-body');
		// console.log(node, body);
		this.modalNodeHighlight(node, 'absolute');
		this.showModalPoint(node, body);
		this.moveModalPoint(this.pointModal, '90%', '50%');
	}
	guide.hideCentury_123 = function() {
		this.updateGuideId(124);
		let recruit = $("#modal-recruit");
		recruit && (recruit.style.display = 'none');
		let node = $('#btn_que3');
		let body = $('.modal-recruit .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		setTimeout(() => {
			guide.showCentury_124();
		}, 1000);
	}
	// 进入
	guide.showCentury_124 = function() {
		$('#switch').click();
		setTimeout(() => {
			let node = $('#monery_btn');
			this.showDirectMask();
			this.directNodeHighlight(node, 'relative');
			this.showDirectPoint(node, 'absolute');
		}, 1000);
	}
	guide.hideCentury_124 = function() {
		this.updateGuideId(125);
		let node = $('#monery_btn');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		// this.showCentury_126();
	}
	// 查看能量
	guide.showCentury_125 = function() {
		let html = '<p style="text-align: center; font-weight: 700; line-height: 28px;">当前能量产出<p>'
			+'<p style="line-height: 28px;">每小时产出：20能量</p><p style="line-height: 28px;">合成家具可以增加能量产出与豪华值</p>';
		this.showGuideView(html, '前往查看');
		let node = $('.lzl_right_1');
		node = node[node.length - 1];
		this.directNodeHighlight(node);
		node.style.border = '1px solid white';
		node.classList.add('flicker');
		this.guideViewBtnCB = () => {
			this.hideCentury_125();
			this.showCentury_126();
		}
	}
	guide.hideCentury_125 = function() {
		this.updateGuideId(126);
		let node = $('.lzl_right_1');
		node = node[node.length - 1];
		this.directNodeRecover(node, 'initial');
		node.style.border = '';
		node.classList.remove('flicker');
	}
	// 装修
	guide.showCentury_126 = function() {
		setTimeout(() => {
			let node = $('.guide-zhuangxiu')[0];
			this.showDirectMask();
			this.directNodeHighlight(node);
			// this.showDirectPoint(node);
			// this.moveModalPoint(pointDirect, '60%', '50%');
		}, 1000);
	}
	guide.hideCentury_126 = function() {
		this.updateGuideId(127);
		let node = $('.guide-zhuangxiu')[0];
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		// this.showCentury_126();
	}
	// 查看 装修介绍
	guide.showCentury_127 = function() {
		let html = '<p style="text-align: left;">使用碎片合成家具可以获得大量豪华值与能量产出</p>'
			+'<p style="text-align: left;">家具种类不同增加的能量产出与豪华值不同</p>'
			+'<p style="text-align: left;">升级家具还会增加大量的豪华值与能量产出</p>';
		this.showGuideView(html, '确定');
		this.guideViewBtnCB = () => {
			this.hideCentury_127();
			this.showCentury_128();
		}
	}
	guide.hideCentury_127 = function() {
		this.updateGuideId(128);
	}
	// 返回 到房间
	guide.showCentury_128 = function() {
		let node = $('#top_img');
		this.showDirectMask();
		this.directNodeHighlight(node, 'relative');
		this.showDirectPoint(node);
	}
	guide.hideCentury_128 = function() {
		this.updateGuideId(129);
		let node = $('#top_img');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		// this.showCentury_126();
	}
	// 招财猫
	guide.showCentury_129 = function() {
		let node = $('#zhaocm');
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node);
	}
	guide.hideCentury_129 = function() {
		this.updateGuideId(130);
		let node = $('#zhaocm');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		// this.showCentury_126();
	}
	// 查看 招财进宝 玩法 红包0.8
	guide.showCentury_130 = function() {
		let html = '<p style="text-align: left;">完成每日随机任务，领取祈福签奖励进行祈福，达到招财猫满意度可以'
			+'根据豪华值获得不同的金币奖励，豪华值越高，满意度越高，金币越多</p>';
		this.showGuideView(html, '确定');
		this.guideViewBtnCB = () => {
			this.hideCentury_130();
			this.showCentury_131();
		}
	}
	guide.hideCentury_130 = function() {
		this.updateGuideId(131);
	}
	// 返回 到房间
	guide.showCentury_131 = function() {
		let node = $('#top_img');
		this.showDirectMask();
		this.directNodeHighlight(node, 'relative');
		this.showDirectPoint(node);
	}
	guide.hideCentury_131 = function() {
		this.updateGuideId(132);
		let node = $('#top_img');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 返回 到世纪城
	guide.showCentury_132 = function() {
		let node = $('#top_img');
		this.showDirectMask();
		this.directNodeHighlight(node, 'relative');
		this.showDirectPoint(node);
	}
	guide.hideCentury_132 = function() {
		this.updateGuideId(133);
		let node = $('#top_img');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 返回 到能量房产
	guide.showCentury_133 = function() {
		let node = $('#top_img');
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node, 'relative');
	}
	guide.hideCentury_133 = function() {
		this.updateGuideId(134);
		let node = $('#top_img');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	
	// 矿产挖掘 原石
	guide.showMine_150 = function() {
		let node = $('.top_bl')[0];
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node, 'relative');
	}
	guide.hideMine_150 = function() {
		this.updateGuideId(151);
		let node = $('.top_bl')[0];
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 添加能量
	guide.showMine_151 = function() {
		let node = $('#btn1');
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node, 'relative');
	}
	guide.hideMine_151 = function() {
		this.updateGuideId(152);
		let node = $('#btn1');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 查看 能量玩法
	guide.showMine_152 = function() {
		this.hideMine_151();
		let html = '<p style="text-align: left;">使用能量可以挖掘出原石，矿场分为初级、中级、高级矿场，'
			+'不同的矿场可以挖掘不同等级的原石，原石可以出售或切割获得奖励</p>';
		this.showGuideView(html, '确定');
		this.guideViewBtnCB = () => {
			this.hideMine_152();
			this.showMine_153();
		}
	}
	guide.hideMine_152 = function() {
		this.updateGuideId(153);
	}
	// 原石切割按钮
	guide.showMine_153 = function() {
		// 选中原石
		$('#cj_1').click();
		let node = $('#img1_qie');
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node, 'relative');
	}
	guide.hideMine_153 = function() {
		this.updateGuideId(154);
		let node = $('#img1_qie');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 切割
	guide.showMine_154 = function() {
		// 选中原石
		$('#cj_1').click();
		let node = $('#qiege_btn1');
		this.showDirectMask();
		this.directNodeHighlight(node, 'relative');
		this.showDirectPoint(node, 'absolute');
	}
	guide.hideMine_154 = function() {
		this.updateGuideId(155);
		let node = $('#qiege_btn1');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		this.showMine_155();
	}
	// 确认切割
	guide.showMine_155 = function() {
		let modal = $("#modal-cut");
		if (modal.style.display !== 'block') modal.style.display = 'block';
		let node = $('#cut_confirm1');
		let body = document.querySelector('.modal-cut .modal-body');
		this.modalNodeHighlight(node);
		this.showModalPoint(node, body);
	}
	guide.hideMine_155 = function() {
		this.updateGuideId(156);
		let recruit = $("#modal-cut");
		recruit && (recruit.style.display = 'none');
		let node = $('#cut_confirm1');
		let body = $('.modal-cut .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		this.showMine_156();
	}
	// 选取切割点 暂停
	guide.showMine_156 = function() {
		let node = $('#qiege_btn1');
		this.showDirectMask();
		this.directNodeHighlight(node, 'relative');
		this.showDirectPoint(node, 'absolute');
	}
	guide.hideMine_156 = function() {
		this.updateGuideId(157);
		let node = $('#qiege_btn1');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		this.showMine_157();
	}
	// 切割红包
	guide.showMine_157 = function() {
		setTimeout(() => {
			let txt = '恭喜完成切割任务，0.5元现金奖励已进入钱包了哦';
			this.showRedPacket(0.5, txt);
			this.updateGuideId(158);
		}, 200);
		$('#modal-worrget-close').onclick = () => {
			modalWorrget.style.display = 'none';
			this.showMine_159();
		}
	}
	// 领取切割原石奖励
	guide.showMine_159 = function() {
		let modal = $("#modal-jiangli");
		if (modal.style.display !== 'block') modal.style.display = 'block';
		let node = $('#queding');
		let body = document.querySelector('.modal-jiangli .modal-body');
		this.modalNodeHighlight(node, 'absolute');
		this.showModalPoint(node, body);
		setTimeout(() => {
			this.updateGuideId(159);
		}, 1000);
	}
	guide.hideMine_159 = function() {
		this.updateGuideId(160);
		let recruit = $("#modal-jiangli");
		recruit && (recruit.style.display = 'none');
		let node = $('#queding');
		let body = $('.modal-jiangli .modal-body');
		this.modalNodeRecover(node);
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		this.showMine_160();
	}
	// 返回 到矿山
	guide.showMine_160 = function() {
		let node = $('#top_img');
		this.showDirectMask();
		this.directNodeHighlight(node, 'relative');
		this.showDirectPoint(node);
	}
	guide.hideMine_160 = function() {
		this.updateGuideId(161);
		let node = $('#top_img');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 返回 到能量房产（感觉没必要多这两步）
	guide.showMine_161 = function() {
		let node = $('#top_img');
		this.showDirectMask();
		this.directNodeHighlight(node, 'relative');
		this.showDirectPoint(node);
	}
	guide.hideMine_161 = function() {
		this.updateGuideId(162);
		let node = $('#top_img');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	
	// 引导 矿山探索（感觉没必要多这两步）
	guide.showSearch_180 = function() {
		let node = $('#img1_qie');
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node, 'relative');
	}
	guide.hideSearch_180 = function() {
		this.updateGuideId(181);
		let node = $('#img1_qie');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 矿场探索
	guide.showSearch_181 = function() {
		let node = $('#img1_tan');
		this.showDirectMask();
		this.directNodeHighlight(node);
		this.showDirectPoint(node, 'relative');
	}
	guide.hideSearch_181 = function() {
		this.updateGuideId(182);
		let node = $('#img1_tan');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 查看 探索玩法
	guide.showSearch_182 = function() {
		let html = '<p style="text-align: left;">消耗能量点击进行探索，获得随机奖励。'
			+'矿场分为初级、中级、高级矿场，矿场等级越高，奖励越好</p>';
		this.showGuideView(html, '确定');
		this.guideViewBtnCB = () => {
			this.hideSearch_182();
			this.showSearch_183();
		}
	}
	guide.hideSearch_182 = function() {
		this.updateGuideId(183);
	}
	// 探索红包
	guide.showSearch_183 = function() {
		setTimeout(() => {
			let txt = '恭喜完成探索任务，0.5元现金奖励已进入钱包了哦';
			this.showRedPacket(0.5, txt);
			this.updateGuideId(184);
		}, 1000);
		$('#modal-worrget-close').onclick = () => {
			modalWorrget.style.display = 'none';
			this.showSearch_184();
		}
	}
	// 返回 到矿山
	guide.showSearch_184 = function() {
		let node = $('#top_img');
		this.showDirectMask();
		this.directNodeHighlight(node, 'relative');
		this.showDirectPoint(node);
	}
	guide.hideSearch_184 = function() {
		this.updateGuideId(185);
		let node = $('#top_img');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 返回 到能量房产 从矿山
	guide.showSearch_185 = function() {
		let node = $('#top_img');
		this.showDirectMask();
		this.directNodeHighlight(node, 'relative');
		this.showDirectPoint(node);
	}
	guide.hideSearch_185 = function() {
		this.updateGuideId(186);
		let node = $('#top_img');
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
	}
	// 返回 到银币世界 从能量房产
	guide.showSearch_186 = function() {
		let modal = $(".first-tab")[0];
		let nodes = document.querySelectorAll('.first-tab a');
		let node = nodes[0];
		modal.style.zIndex = 100;
		this.showDirectMask();
		this.modalNodeHighlight(node);
		this.showModalPoint(node, modal);
		this.moveModalPoint(this.pointModal, '50%', '10%');
		this.maskModal.style.position = 'absolute';
		this.maskModal.style.width = '100%';
		this.maskModal.style.height = '100%';
		this.maskModal.style.background = '#000000';
		this.maskModal.style.opacity = 0.5;
		node.onclick = () => {
			guide.hideSearch_186();
		};
	}
	guide.hideSearch_186 = function() {
		this.updateGuideId(187);
	}
	
	// 引导 地段
	guide.showReach_190 = function() {
		let modal = $(".option3")[0];
		let node = $('#trade');
		modal.style.zIndex = 100;
		this.showDirectMask();
		this.modalNodeHighlight(node);
		this.showModalPoint(node, modal);
		this.moveModalPoint(this.pointModal, '50%', '10%');
		this.maskModal.style.position = 'absolute';
		this.maskModal.style.width = '100%';
		this.maskModal.style.height = '100%';
		this.maskModal.style.background = '#000000';
		this.maskModal.style.opacity = 0.5;
	}
	guide.hideReach_190 = function() {
		this.updateGuideId(191);
		let node = $('#trade');
		let modal = $(".option3")[0];
		modal.style.zIndex = 9;
		this.hideDirectMask();
		this.directNodeRecover(node, '');
		this.hideDirectPoint();
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		guide.showReach_191();
	}
	// 查看 地段玩法
	guide.showReach_191 = function() {
		// $('#trade').click();
		let html = '<p style="text-align: left;">合成地段后，可开启超级BUFF，并且多个地段可以叠加生效的！</p>';
		this.showGuideView(html, '确定');
		this.guideViewBtnCB = () => {
			this.hideReach_191();
		}
	}
	guide.hideReach_191 = function() {
		this.updateGuideId(192);
		this.showReach_192();
	}
	// 引导 关闭地段
	guide.showReach_192 = function() {
		let modal = $("#modal-trade");
		let node = $('#close-trade');
		let body = document.querySelector('.modal-trade .modal-body');
		this.modalNodeHighlight(node, 'absolute');
		this.showModalPoint(node, body);
		this.moveModalPoint(this.pointModal, '5%', 0, '-1%');
	}
	guide.hideReach_192 = function() {
		this.updateGuideId(193);
		let node = $('#close-trade');
		this.modalNodeRecover(node, '');
		this.removeModalMask(this.maskModal);
		this.removeModalPoint(this.pointModal);
		this.showComplete_200();
	}
	
	
	// 完成
	guide.showComplete_200 = function() {
		let html = '<p style="font-weight: 700;">您已经是一名合格的房东了，开启您的收租生活吧！'
			+'温馨提示：每日的<span class="guide-activity">签到、转盘、幸运数字、老板直聘</span>等活动都可以获得超多奖励，赶快去探索吧</p>';
		this.showGuideView(html, '确定');
		this.guideViewBtnCB = () => {
			this.updateGuideId(201)
		}
	}
	
	
	
	
	// 显示元素
	function showElement(el, posi='') {
		el && (el.style.display = posi);
	}
	// 隐藏元素
	function hideElement(el) {
		el && (el.style.display = 'none');
	}
	// 克隆元素
	function cloneElement(target) {
		if (!target) return false;
		let el = target.cloneNode(true);
		el.style = target.style;
		el.style.width = target.offsetWidth;
		el.style.position = 'absolute';
		el.style.zIndex = 99;
		return el;
	}
	
	// 非弹窗节点高亮
	guide.directNodeHighlight = function(node, posi='') {
		// console.log(node);
		node.style.position = posi;
		this.nodeZIndex(node, 999);
	}
	// 非弹窗节点复原
	guide.directNodeRecover = function(node, posi='') {
		// console.log(node);
		node.style.position = posi;
		this.nodeZIndex(node, '');
	}
	// 弹窗节点高亮
	guide.modalNodeHighlight = function(node, posi='relative') {
		node.style.position = posi;
		this.nodeZIndex(node, 99);
	}
	// 弹窗节点复原
	guide.modalNodeRecover = function(node, posi='block') {
		node.style.position = posi;
		this.nodeZIndex(node, '');
	}
	// 节点层级
	guide.nodeZIndex = function(node, idx) {
		node.style.zIndex = idx;
	}
	
	// 显示 红包弹窗
	guide.showRedPacket = function(num, txt='') {
		modalWorrget.style.display = 'block';
		worrgetNum.innerText = num;
		worrgetText.innerText = txt;
	}
	// 隐藏 红包弹窗
	guide.hideRedPacket = function() {
		modalWorrget.style.display = 'none';
		worrgetText.innerText = '恭喜获得现金，奖励已经进入钱包了哦';
	}
	// 显示 奖励弹窗
	guide.showCoinReward = function(type, num) {
		let currency, img;
		if (type == 'silver') {
			currency = '银币';
			img = 'http://img.qxgs.cc/tiantianlaishouzu/img/home/yinbi3.png';
		}
		else if (type == 'gold') {
			currency = '金币';
			img = 'http://img.qxgs.cc/tiantianlaishouzu/img/home/jinbi3.png';
		}
		let modal = $('#modal-tips2');
		let recieveimg = $('#recieveimg');
		let recievenum = $('#recievenum');
		let text = num + currency;
		// console.log(recieveimg, img);
		recieveimg.src = img;
		recievenum.innerText = text;
		modal.style.display = 'block';
	}
	// 隐藏 奖励弹窗
	guide.hideCoinReward = function() {
		let modal = $('#modal-tips2');
		let recievenum = $('#recievenum');
		modal.style.display = 'none';
		recievenum.innerText = '------';
	}
	
	// 非弹窗引导遮罩 显示
	guide.showDirectMask = function() {
		mask.style.display = 'block';
	}
	// 非弹窗引导遮罩 隐藏
	guide.hideDirectMask = function() {
		mask.style.display = 'none';
	}
	// 非弹窗引导手势 显示
	guide.showDirectPoint = function(node, type) {
		let info = this.pointInfo(node, type);
		pointDirect.style.top = (info.top+info.height/2)+'px';
		pointDirect.style.left = (info.left+info.width/2)+'px';
	}
	// 非弹窗引导手势 隐藏
	guide.hideDirectPoint = function() {
		pointDirect.style.top = '-1000px';
		pointDirect.style.left = '-1000px';
	}
	
	// 弹窗层引导手势
	guide.showModalPoint = function(node, body, type) {
		let info = this.pointInfo(node, type);
		let mask = this.createModalMask(body);
		let point = this.createModalPoint(body);
		// console.log(point);
		this.maskModal = mask;
		this.pointModal = point;
		point.style.position = 'absolute';
		point.style.top = (info.top+info.height+40)+'px';
		point.style.left = (info.left+info.width/2)+'px';
		return point;
	}
	// 移动弹窗引导手势
	guide.moveModalPoint = function(p, t, l, r, b) {
		if (!p) return;
		// console.log(p);
		p.style.top = t ? t : 'initial';
		p.style.left = l ? l : 'initial';
		p.style.right = r ? r : 'initial';
		p.style.bottom = b ? b : 'initial';
	}
	// 手势信息
	guide.pointInfo = function(node, type='relative') {
		let info = {};
		if (type == 'relative') {
			info.top = node.offsetTop;
			info.left = node.offsetLeft;
			info.width = node.offsetWidth;
			info.height = node.offsetHeight;
		}
		else if (type == 'absolute') {
			info.top = getTop(node);
			info.left = getLeft(node);
			info.width = node.offsetWidth;
			info.height = node.offsetHeight;
		}
		return info;
		function getTop(e){
			var offset = e.offsetTop;
			if (e.offsetParent != null) offset += getTop(e.offsetParent);
			return offset;
		}
		//获取元素的横坐标
		function getLeft(e){
			var offset=e.offsetLeft;
			if (e.offsetParent != null) offset += getLeft(e.offsetParent);
			return offset;
		}
	}
	// 创造弹窗层遮罩
	guide.createModalMask = function(body) {
		let mask = document.createElement('div');
		// mask.id = 'modal-guide-mask';
		mask.className = 'modal-body-mask';
		body.insertBefore(mask, body.firstChild);
		return mask;
	}
	// 删除弹窗层遮罩
	guide.removeModalMask = function(mask) {
		mask && mask.parentElement.removeChild(mask);
	}
	// 创造弹窗层手势
	guide.createModalPoint = function(body) {
		let point = document.createElement('img');
		point.id = 'guide-modal-point';
		point.className = 'point modal-point';
		point.src = "http://img.qxgs.cc/tiantianlaishouzu/img/home/guide-point.png";
		body.appendChild(point);
		return point;
	}
	// 删除弹窗层手势
	guide.removeModalPoint = function(point) {
		if (point) return point.parentElement.removeChild(point);
	}
	
	// 显示复合查看弹窗
	guide.showGuideView = function(txt, btn) {
		guideView && (guideView.style.display = 'block');
		txt && (guideViewTxt.innerHTML = txt);
		btn && (guideViewBtn.innerText = btn);
	}
	// 隐藏复合查看弹窗
	guide.hideGuideView = function(txt, btn) {
		guideView && (guideView.style.display = 'none');
		guideViewTxt.innerText = '默认的提示内容，请更新后再弹出';
		guideViewBtn.innerText = '确认';
	}
	// 复合弹窗按钮逻辑
	guideViewBtn.onclick = function() {
		guide.hideGuideView();
		guide.guideViewBtnCB && guide.guideViewBtnCB();
	}
	
	// 设置本地引导步骤ID
	guide.setUsersGuideId = function(id) {
		// setItem('userGuideId', id);
		// ugid = id;
		// return;

		// 2023-7-10 20:17:59  =================
		let usgid = getItem('usersGuideId');
		usgid = usgid ? usgid : {};
		// console.log(id);
		if (usgid) {
			if (usgid[userid]) {
				usgid[userid].gid = id;
				// console.log(usgid);
			}
			else {
				usgid[userid] = {gid: id};
				// console.log(userid);
			}
		}
		else {
			usgid[userid] = {"gid": id};
		}
		// console.log(usgid);
		setItem('usersGuideId', usgid);
	}
	// 读取本地引导步骤ID
	guide.getUsersGuideId = function() {
		// let ugid = getItem('userGuideId');
		// return ugid ? ugid : 0;
		// 2023-7-10 20:17:59  =================
		let ugid = getItem('usersGuideId');
		ugid = ugid ? ugid[userid] : false;
		ugid = ugid ? ugid.gid : 0;
		return ugid;
	}
	
	// 上传引导步骤ID
	guide.updateGuideId = function(id, ls=true) {
		let gid = this.getUsersGuideId();
		console.log(gid, id);
		if (gid >= id) return false;
		ls && this.setUsersGuideId(id);
		let token = getCookie('token');
		ajax({
			url: DOMAIN + '/home/guide/set_record',
			header: {
				'Authorization': token,
			},
			data: {
				bu: id
			},
			success: res => {
				if (res.code != 1) openTips(res.msg);
			}
		});
	}
	
	window.guide = guide;
	
	setTimeout(() => {
		guide.init();
		initCount++;
	}, 500);
	
})();